<?php

class Application_Form_CEP extends Zend_Form
{

    public function init()
    {
    	$this->setName('CEP');
    	
    	$cep_no = new Zend_Form_Element_Hidden('cep_no');
    	$cep_no -> addFilter('Int');
    	
    	$cust_no = new Zend_Form_Element_Text('cust_no');
        $cust_no->setLabel('Customer Number')
        	->addFilter('StripTags')
        	->addFilter('StringTrim')
        	->setAttrib('class', 'short')
        	->setAttrib('id', 'zfform');
        
        $staff_no = new Zend_Form_Element_Text('staff_no');
        $staff_no->setLabel('Staff Number')
        	->setRequired(true)
        	->addFilter('StripTags')
        	->addFilter('StringTrim')
        	->addValidator('NotEmpty')
        	->setAttrib('class', 'short')
        	->setAttrib('id', 'zfform');
    	
        $prod_no = new Zend_Form_Element_Text('prod_no');
        $prod_no->setLabel('Product number')
        	->addFilter('StripTags')
        	->addFilter('StringTrim')
        	->addValidator('NotEmpty')
        	->setAttrib('class', 'short')
        	->setAttrib('id', 'zfform');
        
        $prod_description = new Zend_Form_Element_Text('prod_description');
        $prod_description->setLabel('Product Detail')
            ->addFilter('StripTags')
        	->addFilter('StringTrim')
        	->addValidator('NotEmpty')
        	->setAttrib('class', 'short')
        	->setAttrib('id', 'zfform');
        
        $cep_description = new Zend_Form_Element_Radio('cep_description');
        $cep_description ->setLabel('Reason for Non-Supply')
        	->setMultiOptions(array('Out of Stock'=>'Out of Stock', 'Price'=>'Price', 'Not a Stocked Item'=>'Not a Stocked Item'))
        	->setRequired(true)
        	->addValidator('NotEmpty', true)
        	->setAttrib('id', 'zfform');
        
        $dep_no = new Zend_Form_Element_Radio('dep_no');
        $dep_no->setLabel('Department')
        	->setMultiOptions(array('20'=>'Ladies Ware', '21'=>'Mens Ware', '22'=>'Children\'s ware/Toys', '25'=>'Home/Garden', '26'=>'Kitchenware', '23'=>'Home Decoration', '30'=>'Mail Order', '24'=>'Appliances/Entertainment'))
        	->setRequired(true)
        	->addValidator('NotEmpty', true)
        	->setAttrib('id', 'zfform')
        	->setAttrib('class', 'radio');
    	
        $submit = new Zend_Form_Element_Submit('Submit');
    	$submit->setAttrib('id', 'submit');
        
    	$this->addElements(array($cep_no, $cust_no, $staff_no, $prod_no, $prod_description, $cep_description, $dep_no, $submit));
    	
    }
    	
    
}

